var events = require('events'); //引入events 模块
var eventEm = new events.EventEmitter(); //创建eventEm对象

var connectHandler = function ddddd () {
    console.log('链接成功')
    eventEm.emit('data_rev');
}
eventEm.on('connect', connectHandler);

eventEm.on('data_rev', function () {
    console.log('数据绑定成功')
});
eventEm.emit('connect');

console.log('程序执行完毕！！！！')